Export text and OLE to Word newline\Carriage return question

Is is possible in DXL to send a carriage return/new line(CR\NL) to Word?
I have a script which exports a module name to Word, along with an OLE.

In Word, the module name appears, followed by the OLE on the same line, and the cursor is at the end of the OLE.

I wish to place a CR\NL so that the OLE appears on the next line after the module name, and the next line after the OLE is available for more module name/OLEs.

I have tried

copyToClipboard("\n")

but this does not work.

Any suggestions?

Thank you.


Gedinfo - Wed Mar 20 12:55:32 EDT 2013

Re: Export text and OLE to Word newline\Carriage return question
adevicq - Wed Mar 20 13:07:57 EDT 2013

Hi,
The method implemented in the std word export is:

const string cMethodInsertParagraphAfter =    "InsertParagraphAfter"
    vbaCheckRes(oleMethod(objSel, cMethodInsertParagraphAfter))

 


Regards,
Alain

 

Re: Export text and OLE to Word newline\Carriage return question
Gedinfo - Wed Mar 20 14:24:58 EDT 2013

adevicq - Wed Mar 20 13:07:57 EDT 2013

Hi,
The method implemented in the std word export is:

const string cMethodInsertParagraphAfter =    "InsertParagraphAfter"
    vbaCheckRes(oleMethod(objSel, cMethodInsertParagraphAfter))

 


Regards,
Alain

 

Thanks Alain,

but using this does not result in any CR/NL.

code snippets:
 

...
string strModule = m."Name"
...
copyToClipboard(strModule)
vbaCheckRes(oleMethod(oSelection, cMethodPaste))
vbaCheckRes(oleMethod(oSelection, cMethodInsertParagraphAfter))
// Does not matter if cMethodInsertParagraphAfter is called or not, same result.

Re: Export text and OLE to Word newline\Carriage return question
SystemAdmin - Wed Mar 20 14:25:50 EDT 2013

Hi

Im Doors you have rich text data and this data you copy to the clipboard. Then you evaluate a Paste-Method for your Word. If you want to split them into to paragraphs, you have to use a rich-text-par-Function (http://www.biblioscape.com/rtf15_spec.htm#Heading30).

I've used WordPad (Windows Accessory Tool) and created an rtf-file holding two lines
 

First Paragraph
Second Paragraph

 


Then I got the following rich text:

 

 

 

{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\lang1031\f0\fs22 First Paragraph\par
Second Paragraph\par
\'00\par
}



Replace the "paragraph texts" by your content and it should work.

Best regards
Wolfgang



 

 

Re: Export text and OLE to Word newline\Carriage return question
Gedinfo - Wed Mar 20 14:54:44 EDT 2013

SystemAdmin - Wed Mar 20 14:25:50 EDT 2013

Hi

Im Doors you have rich text data and this data you copy to the clipboard. Then you evaluate a Paste-Method for your Word. If you want to split them into to paragraphs, you have to use a rich-text-par-Function (http://www.biblioscape.com/rtf15_spec.htm#Heading30).

I've used WordPad (Windows Accessory Tool) and created an rtf-file holding two lines
 

First Paragraph
Second Paragraph

 


Then I got the following rich text:

 

 

 

{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\lang1031\f0\fs22 First Paragraph\par
Second Paragraph\par
\'00\par
}



Replace the "paragraph texts" by your content and it should work.

Best regards
Wolfgang



 

 

Your RTF "code" is not valid in DXL.

See attachment for output. It does not matter if I use the paragraph method.
Attachments

attachment_14959246_Capture.PNG

Re: Export text and OLE to Word newline\Carriage return question
SystemAdmin - Wed Mar 20 15:12:34 EDT 2013

SystemAdmin - Wed Mar 20 14:25:50 EDT 2013

Hi

Im Doors you have rich text data and this data you copy to the clipboard. Then you evaluate a Paste-Method for your Word. If you want to split them into to paragraphs, you have to use a rich-text-par-Function (http://www.biblioscape.com/rtf15_spec.htm#Heading30).

I've used WordPad (Windows Accessory Tool) and created an rtf-file holding two lines
 

First Paragraph
Second Paragraph

 


Then I got the following rich text:

 

 

 

{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\lang1031\f0\fs22 First Paragraph\par
Second Paragraph\par
\'00\par
}



Replace the "paragraph texts" by your content and it should work.

Best regards
Wolfgang



 

 

{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\lang1031\f0\fs22 First Paragraph\par
Second Paragraph\par
}


I do not know, where the \'00\par has been from, sorry. And if you use pard instead of par, you'll have the default paragraph settings, but acutally I do not have an example which works in Doors and in Word.

> It does not matter if I use the paragraph method.

a) You have to copy the first part of the data to the clipboard
b) You have to perform a word.paste to put the data into word
c) You have to perform the word.paragraph method
d) You have to copy the second part of the data to the clipboard
e) You have to perform word.past to put the data into word.

Best regards
Wolfgang